package com.foodcommunity.service;

import com.foodcommunity.common.Result;
import com.foodcommunity.dto.RestaurantReviewDTO;
import com.foodcommunity.entity.Restaurant;
import com.foodcommunity.entity.RestaurantReview;

import java.util.List;
import java.util.Map;

public interface RestaurantService {
    /**
     * 获取热门餐厅
     * @return 热门餐厅列表，包含评论数量
     */
    List<Map<String, Object>> getHotRestaurants();
    
    /**
     * 获取餐厅详情
     */
    Result<Restaurant> getRestaurantDetail(Long id);
    
    /**
     * 添加餐厅
     */
    Result<Restaurant> addRestaurant(Restaurant restaurant);
    
    /**
     * 更新餐厅
     */
    Result<Restaurant> updateRestaurant(Restaurant restaurant);
    
    /**
     * 删除餐厅
     */
    Result<Void> deleteRestaurant(Long id);
    
    /**
     * 分页获取餐厅列表
     */
    Map<String, Object> getRestaurantsWithPage(int page, int size);
    
    /**
     * 根据条件筛选餐厅
     */
    Map<String, Object> getRestaurantsByCondition(String cuisineType, Integer minPrice, 
                                                Integer maxPrice, Double minRating, 
                                                int page, int size);
    
    /**
     * 添加餐厅评论
     */
    Result<RestaurantReview> addRestaurantReview(RestaurantReviewDTO reviewDTO, Long userId);
    
    /**
     * 删除餐厅评论
     */
    Result<Void> deleteRestaurantReview(Long id, Long userId);
    
    /**
     * 获取餐厅评论列表
     */
    List<RestaurantReview> getRestaurantReviews(Long restaurantId);
    
    /**
     * 分页获取餐厅评论
     */
    Map<String, Object> getRestaurantReviewsWithPage(Long restaurantId, int page, int size);
    
    /**
     * 获取用户的餐厅评论
     */
    List<RestaurantReview> getUserRestaurantReviews(Long userId);
    
    /**
     * 获取餐厅评论数量
     */
    int getRestaurantReviewCount(Long restaurantId);
    
    /**
     * 获取指定区域内的餐厅
     */
    List<Restaurant> getRestaurantsInArea(Double northLat, Double southLat, Double eastLng, Double westLng,
                                         String cuisineType, Integer minPrice, Integer maxPrice, Double minRating);
} 